package com.daz.student.information.server.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.daz.student.information.dao.IStudentInfoDao;
import com.daz.student.information.pojo.StudentInfoPojo;
import com.daz.student.information.server.IStudentInfoSV;
import com.daz.student.pojo.studentPojo;
import com.daz.student.summary.pojo.SummaryPojo;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

@Service
public class StudentInfoSV implements IStudentInfoSV{
	@Autowired
	private IStudentInfoDao studentInfoDao;
	public List<StudentInfoPojo> searchStudentList(Map<String, Object> searchConditionMap) throws Exception{
		return studentInfoDao.searchStudentList(searchConditionMap);
	}
	public List<StudentInfoPojo> qryStudentById(
			Map<String, Object> searchConditionMap) throws Exception {
		// TODO Auto-generated method stub
		return studentInfoDao.qryStudentById(searchConditionMap);
	}
	/*public PageInfo<StudentInfoPojo> searchStudentByTeacherId(Map<String, Object> searchConditionMap,int pageNum,int pageSize)throws Exception{
		
		PageHelper.startPage(pageNum, pageSize);
		List<StudentInfoPojo> list = studentInfoDao.searchStudentByTeacherId(searchConditionMap);
		return new PageInfo<>(list);
	}
	public List<StudentInfoPojo> searchStudentIsNotSelect(Map<String, Object> searchConditionMap)throws Exception{
		return studentInfoDao.searchStudentIsNotSelect(searchConditionMap);
	}*/
	
	@Override
	public void changePassWord(Map<String, Object> searchConditionMap)
			throws Exception {
		// TODO Auto-generated method stub
		studentInfoDao.changePassWord(searchConditionMap);
	}
	@Override
	public void updateStudentInfo(Map<String, Object> searchConditionMap)
			throws Exception {
		// TODO Auto-generated method stub
		studentInfoDao.updateStudentInfo(searchConditionMap);
	}
	@Override
	public PageInfo<StudentInfoPojo> searchStudentList(
			Map<String, Object> searchConditionMap, int pageNum, int pageSize)
			throws Exception {
		// TODO Auto-generated method stub
		PageHelper.startPage(pageNum, pageSize);
		List<StudentInfoPojo> list = studentInfoDao.searchStudentList(searchConditionMap);
		return new PageInfo<>(list);
	}
	@Override
	public int importStudents(StudentInfoPojo value) throws Exception {
		// TODO Auto-generated method stub
		studentInfoDao.importStudents(value);
		return 0;
	}
	@Override
	public Boolean deleteStudentInfo(Map<String, Object> searchConditionMap)
			throws Exception {
		// TODO Auto-generated method stub
		return studentInfoDao.deleteStudentInfoByStudentId(searchConditionMap);
	}
	@Override
	public Boolean updateByClass(StudentInfoPojo value) throws Exception {
		// TODO Auto-generated method stub
		return studentInfoDao.updateByClass(value);
	}
	
	
}
